home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / comm / thor / AddProcmail.readme < prev    next >
Text File  |  1997-09-05  |  9KB  |  238 lines

  1. Short:    Updates and uploads .procmailrc filter
  2. Author:   kenny@bgnett.no (Kenneth "Kenny" Nilsen)
  3. Uploader: kenny@bgnett.no (Kenneth "Kenny" Nilsen)
  4. Version:  1.2 (FINAL RELEASE)
  5. Type:     comm/thor
  6. Requires: Thor 2.3+, optional NComm, ISP with Procmail (ask your netadmin)
  7. Comment:  Kill those spam emails forever!
  8.  
  9.  
  10. mailto:kenny@bgnett.no
  11.  
  12. $VER: AddProcmail 1.2 (17.7.97)
  13.  
  14. Copyright (C) 1997 by Digital Surface/Kenneth "Kenny" Nilsen.
  15. All rights reserved.
  16.  
  17. NEWS:
  18.  
  19.    o   Only search for duplicates when adding from newsgroups
  20.    o   More settings
  21.    o   Fixed bug with searching new header files (no search performed).
  22.    o   Improved text
  23.    o   Resource links to Procmail archive, FAQ and info (see below)
  24.  
  25. INTRODUCTION
  26.  
  27.    o   Are you sick of getting spam emails ?
  28.    o   Doesn't an email to postmaster/abuse stop it ?
  29.    o   You can't preview emails before download to kill unwanted mail ?
  30.    o   You don't want to be online to kill unwanted emails - correct ?
  31.  
  32. If you can answer yes to all of these questions, then this will might be
  33. the solution for you.
  34.  
  35. If your ISP mailserver uses Procmail to deliver emails to you, and the
  36. account you have is at the same server as the email server, you can use a
  37. file in your $HOME dir called '.procmailrc'. This is a filter file that can
  38. sort, forward, copy, a.s.o., all e-mails you get. You don't even have to be
  39. online to activate it - it's all done automatically locally at your ISP's
  40. machine at every new e-mail that arrives for you. You can also use Procmail
  41. to remove unwanted emails and that is what this package is based on.
  42.  
  43. This script will automagically create a .procmailrc header file if you don't
  44. already have one. When you get an e-mail or news message that you don't want
  45. to receive in e-mail in the future you just invoke the script. It will then
  46. format and add the domain of the current message header as an entry in the
  47. .procmailrc file on your disk. The entry tell Procmail to send these
  48. messages to /dev/null (ala NIL:) next time you get email from this domain in
  49. your $HOME dir at your ISP. it will be handled while you're not there as
  50. well. Next you can optionally upload the updated .procmailrc file to your
  51. account.
  52.  
  53. I have experienced that this has reduced spam mail to about zip-zero at my
  54. account. I may get a spam mail once a week or less from a new domain, but it
  55. gets added to the .procmailrc file immediatly and then emails from this
  56. domain cannot be downloaded by Thor (or YAM, Elm, Pine for that matter if
  57. you use those instead..) in future. Also a big thanks to Petter Nilsen/
  58. Ultima Thule for providing me with more than 700+ domains used in the
  59. .procmailrc file in the archive.
  60.  
  61.  
  62. USAGE:
  63. ------
  64.  
  65. 1) Install the script 'AddProcmail.thor' in Thor:Rexx/
  66. 2) Edit the header in the arexx script (see right below here)
  67. 3) Assign the script to a function key in Thor for convinient use
  68.  
  69. ---
  70. /*
  71. **    $VER: AddProcmail.thor 1.2 (17.7.97)
  72. **
  73. **    © by Kenneth 'Kenny' Nilsen - Freeware
  74. **    mailto:kenny@bgnett.no
  75. **    http://www.bgnett.no/~kenny/
  76. **
  77. **    Add an entry to the .procmailrc file and upload to server.
  78. **    Also initializes new header file if one don't already exists.
  79. **    Must be invoked from Thor!
  80. */
  81.  
  82. /* Please modify the next variables */
  83.  
  84. /* Please enter the name on your email conference. When this is detected
  85. *  the search routine is disabled. This is because, if you get a spam
  86. *  email it is "guaranteed" not in the filterfile. However, I usually add
  87. *  spam domains when I see them in newsgroups as well since they are likely
  88. *  to end up in email too later. You cannot filter newsgroups therefor you
  89. *  need to check if the entry already exists in the email filter to avoid
  90. *  duplicates */
  91.  
  92. EmailConf = "EMail"
  93.  
  94. /* Next entry tells this script the path to where the .procmailrc
  95. *  file exists. Change this to suit your system. The filename is not
  96. *  needed since the script adds it automatically. You MUST end the path
  97. *  with a column (:) or slash (/) */
  98.  
  99. ProcPath = "txt:.net/"
  100.  
  101. /* If you want to upload the .procmailrc file automatically from this
  102. *  script you should set this bool to true (1) else set it to 0 if you
  103. *  don't want to be asked if you want to upload the file. Script is
  104. *  aborted at this stage if false. The script uses NComm to upload. */
  105.  
  106. Upload   = 1
  107.  
  108. /* Enter the phonebook entry name here if you have set the above
  109. *  bool to true. The name must match exact the one you have in the
  110. *  NComm phonebook. The phonebook entry should invoke an upload script
  111. *  to login, upload and exit automatically. See provided example
  112. *  script for NComm on how you can do it */
  113.  
  114. BBSEntry = "to update .procmailrc"
  115.  
  116. /* If you don't want this script to search for duplicates then set this
  117. *  flag to 1 - search is only activated when adding from a newsgroup */
  118.  
  119. EmailFlag=0
  120. ---
  121.  
  122. You may have to change the following lines in the .procmailrc header:
  123.  
  124. ---
  125. PATH=/bin:/usr/bin:/opt/bin
  126. MAILDIR=$HOME/Mail
  127. LOGFILE=$HOME/log.procmail
  128. ---
  129.  
  130. From: FAQ Editor <faq-editor@ii.com>
  131.  
  132. 1]  To find out if procmail is on your system and what the full path to
  133.     it is, type one of the following commands:
  134.  
  135.       Shell      Command
  136.       =====      =======
  137.       csh        which procmail
  138.       sh or ksh  type procmail
  139.       various    whereis procmail
  140.       various    where procmail
  141.  
  142. Ask your netadmin for details!
  143.  
  144. That's it.
  145.  
  146. You may change the behaviour of Procmail. I think redirecting unwanted
  147. email to /dev/null is the best solution (default behaviour) to avoid
  148. mail-loops, wasting bandwith and such. You can automate it to send a copy
  149. of the message to an abuse@ or something as well (read the man files of
  150. Procmail for more information on this - see links below).
  151.  
  152. NOTE that the search routine assume that there is four lines for each entry.
  153. If you change the number of lines each entry creates you must also modify
  154. the search routine. Please do not add comments between the entries after the
  155. first one.
  156.  
  157.  
  158. Good resources for Procmail:
  159. ----------------------------
  160.  
  161. ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/procmail.tar.gz
  162.  
  163. http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html
  164. http://www.cc.gatech.edu/ftp/linux/distributions/slackware/contents/procmail
  165. http://www.math.fu-berlin.de/~guckes/procmail/
  166.  
  167. Author of the Procmail binary is Stephen R. van den Berg <srb@cuci.nl>
  168.  
  169.  
  170. USAGE WITH NCOMM:
  171. -----------------
  172.  
  173. I have provided an example NComm script that can be used in conjunction with
  174. the arexx script. You must probably modify it quite much to suit your ISP
  175. login proceedure. It is just meant as an example on how you can automate the
  176. login procedure. Personally I am always watching the proceedure so I haven't
  177. added support for NO CARRIER and so on in the Ncomm script.
  178.  
  179. Add a new phonebook entry in NComm and call it "MyBBS" (where MyBBS is
  180. anything you want to call it..). Set path and name on script in the Script:
  181. entry of the phonebook. Set your ISP password in the Password: entry of the
  182. phonebook and finally save.
  183.  
  184. Modify the arexx script (Addprocmail.thor) where BBSentry = "MyBBS" and
  185. set Upload = 1. Next time you add a new entry you will be asked if you want
  186. to upload the new modified script. If you select "Upload" the arexx script
  187. will invoke Ncomm (start it if it isn't already started) and dial the
  188. "MyBBS" which again starts the Ncomm script (too complicated hu?).
  189.  
  190. Note that you can easily make this arexx script work with f.ex. Term by
  191. writting a simple arexx script. If you do I would like to distribute it with
  192. future versions of AddProcmail. Please send contribution (which will be
  193. credited) to the e-mail address above.
  194.  
  195.  
  196. EXTRAS
  197. ------
  198.  
  199. I have provided a .procmailrc file with several hundreds (700+) domains that
  200. will be stopped before you get them in your e-mail. Almost every entries are
  201. collected by Petter Nilsen (thanks Petter!). Converted to .procmailrc file
  202. by myself.
  203.  
  204.  
  205. NOTES:
  206. ------
  207.  
  208. - You will need telnet or shell login access to your ISP to use Procmail.
  209.   AddProcmail is of no use if your ISP doesn't use Procmail.
  210. - You will also need your account to be on the same place where the mailserver
  211.   is (AFAIU).
  212. - I am not a Unix expert nor a Procmail expert. Please refer to the man
  213.   files of Procmail(rc) and/or your Internet provider with questions about
  214.   how and if you can get Procmail to work with your system. Simply ask your
  215.   ISP adm. if you can use .procmailrc files with your email address to
  216.   filter emails. They should be able to inform you if you can or not.
  217. - Check resource references above for more information on Procmail.
  218.  
  219.  
  220. COMMENTS
  221. --------
  222.  
  223. Feel free to comment this package or send suggestions.
  224.  
  225.     mailto:kenny@bgnett.no (Kenny)
  226.  
  227.  
  228. ============================= Archive contents =============================
  229.  
  230. Original  Packed Ratio    Date     Time    Name
  231. -------- ------- ----- --------- --------  -------------
  232.     8629    3761 56.4% 23-Aug-97 15:22:34 +AddProcmail.readme
  233.    31483    5504 82.5% 17-Jul-97 09:32:20 +.procmailrc
  234.      640     322 49.6% 25-Jun-97 16:52:10 +UpdateProcmailrc.script
  235.     7492    2881 61.5% 17-Jul-97 09:50:52 +AddProcmail.thor
  236. -------- ------- ----- --------- --------
  237.    48244   12468 74.1% 24-Aug-97 00:00:34   4 files
  238.